<?php

// get data
	$d = ($edit) ? $module->users_get($edit) : false;

// title
	?><h1 class="<?php echo ($add) ? 'add' : 'edit'; ?>"><?php echo ($add) ? $lang->get('add-users') : $lang->get('edit-users'); ?></h1><?php

// form
	?>
	<form name="frm" method="post" action="<?php echo $cosa->system('base-url'); ?>/?m=<?php echo $m; ?>&s=<?php echo $s; ?>">
	<input type="hidden" name="<?php echo ($add) ? 'add' : 'edit'; ?>" value="<?php echo ($add) ? '1' : $d['id']; ?>" />
	<ul>
		<li><ul>
				<li><label for="uname"><?php $lang->put('uname'); ?> <abbr title="<?php $lang->put('required'); ?>">*</abbr></label>
					<input type="text" name="uname" value="<?php if($d) echo stripslashes($d['uname']); ?>" class="fld" />
				</li>
				<li><label for="pass"><?php $lang->put('password'); ?> <abbr title="<?php $lang->put('leave-blank-keep'); ?>"><sup>1</sup></abbr></label>
					<input type="password" name="pass" value="" class="fld" />
				</li>
			</ul>
		</li>
		<li>
			<ul>
				<li><label for="name_f"><?php $lang->put('name_f'); ?></label>
					<input type="text" name="name_f" value="<?php if($d) echo stripslashes($d['name_f']); ?>" class="fld" />
				</li>
				<li><label for="name_l"><?php $lang->put('name'); ?></label>
					<input type="text" name="name_l" value="<?php if($d) echo stripslashes($d['name_l']); ?>" class="fld" />
				</li>
			</ul>
		</li>
		<li><label for="email"><?php $lang->put('email'); ?></label>
			<input type="text" name="email" value="<?php if($d) echo stripslashes($d['email']); ?>" class="fld" />
		</li>
		<li><label for="group_id"><?php $lang->put('group'); ?></label>
			<?php
			$value = (isset($d)) ? $d['group_id'] : false;
			$module->printGroupsDD('group_id', $value);
			?>
		</li>
		<input type="hidden" name="language_id" value="<?php echo ($d) ? $d['language_id'] : ''; ?>" />
		<?php /*
		<li><label for="language"><?php $lang->put('language'); ?></label>
			<input type="text" name="language" value="<?php if($d) echo stripslashes($d['language']); ?>" class="fld" />
		</li>*/ ?>
		<li class="sbmt">
			<input type="submit" value="<?php $lang->put('submit'); ?>" class="sbmt" />
			<?php if($d) $module->printDelLink($d['id'], false, $lang->get('del-users')); ?>
		</li>
	</ul>
	</form>


